<!DOCTYPE html>
<html style="background-color: #fff">

<head>
    <meta charset="utf-8">
    <title>供需对接服务系统--应接项目</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/supplier/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/supplier/common/js/tel.js" charset="utf-8"></script>

</head>
<style>
    .release ul:nth-child(2) li label {
        width: 28%;
    }

    .release ul:first-child li label {
        width: 23%;
    }

    .release .address, .personnel .address {
        width: 65%;
    }
    .xm-search-input{
        width: 90%!important;
        height: 34px!important;
        border: 1px solid #DDDDDD!important;
        padding-left: 20px!important;
    }

    .thesisbor>div {
        /* width: 600px; */
        margin: 10px;
        padding: 0 10px;
        border: 1px solid #EEEEEE;
    }

    .layui-form-radio {
        line-height: 28px;
        margin-left: 20px;
        margin-right: 0px;
        margin-top: 2px;
        /* padding-right: 10px; */
        cursor: pointer;
        font-size: 0;
    }


</style>

<body>
<!--头部-->
<header class="whitebg"></header>
<!--容器-->
<div class="container clearfix">
    <!--占位-->
    <!--右侧内容-->
    <div class="fr" style="width: 86%">
        <form class="layui-form" id="myForm">
            <input id="supProjectId"  name="supProjectId"  type="hidden" value="${supProjectId}">
            <input id="projectType" type="hidden" value="${project.projectType}">
            <input id="publishType" type="hidden" value="${project.publishType}">
            <input id="bzjper" type="hidden" value="${project.bzjper}">
            <input id="source" type="hidden" value="${source}">

            <div class="release" style="width: 100%;">
                <ul class="clearfix whitebg" style="width: 95%">
                    <span style="font-weight: bold">上传投标文件
                        <#if "${project.publishType}"=="001">
                            （非必传）
                        </#if>
                    </span>
                    <div class="thesisbor uploadfilediv"  style="width: 85%;">
                    </div>
                    <div class="thesisbor center mt10 " style="border: 1px solid #DDDDDD;width: 85%;">
                        <img src="${re.contextPath}/plugin/common/images/77@2x.png"  style="margin-top: 10px;width: 34px;" alt="" class="thesisimg3 file-upload" filedata="{'type':'301','projectType':'002'}">
                        <div style="border: none;width: 100%;margin:0px;padding:0px">上传文件</div>
                    </div>

                </ul>
            </div>
            <#if  "${project.publishType}"=="001" >
                <div class="release" style="width: 100%;">
                    <ul class="clearfix whitebg">
                        <span style="font-weight: bold">设置实施费用</span>
                        <#if "${project.projectType}"?contains("001")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">监理实施费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="jlSsMoney" name="jlSsMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                        <#if "${project.projectType}"?contains("002")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">咨询实施费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="zxSsMoney" name="zxSsMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                        <#if "${project.projectType}"?contains("003")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">检测实施费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="jcSsMoney" name="jcSsMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                        <#if "${project.projectType}"?contains("100")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">其他实施费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="qtSsMoney" name="qtSsMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                    </ul>
                </div>
            </#if>

            <#if  "${project.publishType}"!="001" >
                <div class="release" style="width: 100%;">
                    <ul class="clearfix whitebg">
                        <span style="font-weight: bold">设置服务费用</span>
                        <#if "${project.projectType}"?contains("001")   >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">监理服务费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="jlFwMoney" name="jlFwMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                        <#if "${project.projectType}"?contains("002")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">咨询服务费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="zxFwMoney" name="zxFwMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                        <#if "${project.projectType}"?contains("003")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">检测服务费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="jcFwMoney" name="jcFwMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                        <#if "${project.projectType}"?contains("100")  >
                            <li class="clearfix" style="width: 100%;margin-top: 10px;">
                                <label class="fl" style="width: 25%;">其他服务费用<span class="red">*</span> </label>
                                <input type="text" class="fl" id="qtFwMoney" name="qtFwMoney" lay-maxlength="30"
                                       lay-verify="required|maxlength|decimal"><span class="ml10 fl">元</span>
                            </li>
                        </#if>
                    </ul>
                </div>
            </#if>

            <div class="release" style="width: 100%;">
                <ul class="clearfix whitebg">
                    <span style="font-weight: bold">设置项目经理</span>
                    <#if "${project.projectType}"?contains("001") >
                        <li class="clearfix" style="width: 100%;margin-top: 10px;">
                            <label class="fl" style="width: 25%;">监理项目经理<span class="red">*</span> </label>
                            <div style="display: flow-root;width: 52%;" class=" h3 fl">
                                <div class="slt" id="jlManagerPerson" ></div>
                            </div>
                            <input type="text" class="fl hide srxmjl" id="jlManagerPersonName" name="jlManagerPersonName" lay-maxlength="30"
                                   lay-verify="maxlength">
                            <#if  "${source}"=="w">
                                <img src="${re.contextPath}/plugin/common/images/35@2x.png"  style="width: 34px;margin-top: 3px;" class="fl ml20 srimage"  onclick="_crt_page.events.srxmjl(this)" >
                            </#if>
                        </li>
                    </#if>
                    <#if "${project.projectType}"?contains("002")   >
                        <li class="clearfix" style="width: 100%;margin-top: 10px;">
                            <label class="fl" style="width: 25%;">咨询项目经理<span class="red">*</span> </label>
                            <div style="display: flow-root;width: 52%;" class=" h3 fl">
                                <div class="slt" id="zxManagerPerson" ></div>
                            </div>
                            <input type="text" class="fl hide srxmjl" id="zxManagerPersonName" name="zxManagerPersonName" lay-maxlength="30"
                                   lay-verify="maxlength">
                            <#if  "${source}"=="w">
                                <img src="${re.contextPath}/plugin/common/images/35@2x.png"  style="width: 34px;margin-top: 3px;" class="fl ml20 srimage"  onclick="_crt_page.events.srxmjl(this)" >
                            </#if>
                        </li>
                    </#if>
                    <#if "${project.projectType}"?contains("003")   >
                        <li class="clearfix" style="width: 100%;margin-top: 10px;">
                            <label class="fl" style="width: 25%;">检测项目经理<span class="red">*</span> </label>
                            <div style="display: flow-root;width: 52%;" class=" h3 fl">
                            <div class="slt" id="jcManagerPerson" ></div>
                            </div>
                            <input type="text" class="fl hide srxmjl" id="jcManagerPersonName" name="jcManagerPersonName" lay-maxlength="30"
                                   lay-verify="maxlength">
                            <#if  "${source}"=="w">
                                    <img src="${re.contextPath}/plugin/common/images/35@2x.png"  style="width: 34px;margin-top: 3px;" class="fl ml20 srimage"  onclick="_crt_page.events.srxmjl(this)" >
                            </#if>

                        </li>
                    </#if>
                    <#if "${project.projectType}"?contains("100")  >
                        <li class="clearfix" style="width: 100%;margin-top: 10px;">
                            <label class="fl" style="width: 25%;">其他项目经理<span class="red">*</span> </label>
                            <div style="display: flow-root;width: 52%;" class="h3 fl">
                            <div class="slt" id="qtManagerPerson" ></div>
                            </div>
                            <input type="text" class="fl hide srxmjl" id="qtManagerPersonName" name="qtManagerPersonName" lay-maxlength="30"
                                   lay-verify="maxlength">
                            <#if  "${source}"=="w">
                                <img src="${re.contextPath}/plugin/common/images/35@2x.png"  style="width: 34px;margin-top: 3px;" class="fl ml20 srimage"  onclick="_crt_page.events.srxmjl(this)" >
                            </#if>
                        </li>
                    </#if>
                </ul>
            </div>
        <#if  "${source}"=="w">
<#--            <div class="release" style="width: 100%;">-->
<#--                <ul class="clearfix whitebg">-->
<#--                        <li class="clearfix" style="width: 100%;margin-top: 10px;">-->
<#--                            <label class="fl" style="width: 40%;">支付保证金：&nbsp;&nbsp;￥<span-->
<#--                                        id="bzMoneyJs"></span></label>-->
<#--                            <input type="hidden" class="fl" id="bzMoney" name="bzMoney"  >-->
<#--                            <div class="fr">-->
<#--                                <img src="${re.contextPath}/plugin/common/images/82@2x.png">-->
<#--                                <a class="blue" onclick="explain()">保证金说明</a>-->
<#--                            </div>-->
<#--                        </li>-->

<#--                </ul>-->
<#--                <div class="pay clearfix" style="margin-bottom: 20px;">-->
<#--                    <input type="radio" name="name1" id="" value="" class="fl "/>-->
<#--                    <img src="${re.contextPath}/plugin/common/images/79@2x.png" class="mt02">-->
<#--                    <span class=" mt05">支付宝</span>-->
<#--                    <input type="radio" name="name1" id="" value="" class="fl ml20 "/>-->
<#--                    <img src="${re.contextPath}/plugin/common/images/80@2x.png" class=" mt02">-->
<#--                    <span class="mt05 ">微信支付</span>-->
<#--                    <input type="radio" name="name1" id="" value="" class="fl  ml20"/>-->
<#--                    <img src="${re.contextPath}/plugin/common/images/81@2x.png" class=" mt02">-->
<#--                    <span class="mt05 ">银联支付</span>-->
<#--                </div>-->
<#--            </div>-->
             </#if>


            <div class="releaseBtn center  whitebg" style="text-align: center;">
                <button type="button" class="blue bgnone close">关闭</button>
                <button type="submit" lay-submit lay-filter="save" class="bluebg white ft18" id="btnsave">保存</button>
                </button>
            </div>
        </form>

    </div>
</div>
<!--JQ-->
<!--公用样式JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.boot.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/form.file.js"></script>

<#-- 可以多选的下拉框 -->
<script src="${re.contextPath}/plugin/layui/xm-select.js"></script>


<!-- 公共配置第三方组件 -->
<script type="text/javascript">
    layui.config({
        version: false,
        debug: false,
        base: "${re.contextPath}/plugin/layui/lay/extra/"
    })

</script>


<script>
    var layer, form, laydate, table, autocomplete;
    var _crt_page;
    var _xstjlManagerPerson;
    var _xstzxManagerPerson;
    var _xstjcManagerPerson;
    var _xstqtManagerPerson;

    layui.use(['form', 'laydate', 'layer', 'autocomplete'], function () {
        layer = layui.layer;
        form = layui.form;
        laydate = layui.laydate;

        $('.close').click(function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        form.verify({
            maxlength: function (v, item) {
                var maxlength = item.getAttribute('lay-maxlength');
                if (v.trim() != '') {
                    if (v.trim().length > maxlength) {
                        return "输入长度不能大于" + maxlength + "个字符！";
                    }
                }
            },
            phoneNumber: function (v) {
                if (v.trim() == '') {
                    return '手机号不能为空';
                } else {
                    if (!v.trim().isMobile() && !v.trim().isTel()) {
                        return '请输入正确的手机号码或电话号码\n\n例如:13916752109或0531-3614072';
                    }
                }
            },
            number: function (v) {
                var reg = /^[0-9]*$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的数字';
                }
            },
            decimal: function (v) {
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,10})?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的金额';
                }
            },
            perdecimal: function (v) {
                var reg = /^[1-9][0-9]*([.][0-9]+)?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    if (v.trim() != "0" || v.trim() != 0) {
                        return '请输入数字';
                    }
                }
            }
        })
        _crt_page = {
            init: function () {
                //初始化事件
                _crt_page.events._init();
                //初始化Form
                form.on('submit(save)', _crt_page.forms.save);
                form.on('submit(submit)', _crt_page.forms.commit);
            },
            forms: {
                save: function (data) {
                    if(data.field.jlFwMoney && Number(data.field.jlFwMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if(data.field.zxFwMoney && Number(data.field.zxFwMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if(data.field.jcFwMoney && Number(data.field.jcFwMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if(data.field.qtFwMoney && Number(data.field.qtFwMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if (data.field.jlSsMoney && Number(data.field.jlSsMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if(data.field.zxSsMoney && Number(data.field.zxSsMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if(data.field.jcSsMoney && Number(data.field.jcSsMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    if(data.field.qtSsMoney && Number(data.field.qtSsMoney)<=0){
                        layer.msg('金额不正确', {icon: 2});return false;
                    }
                    $('#btnsave').addClass("layui-btn-disabled").attr("disabled",true);
                    var istg = _crt_page.events.saveBefore(data);
                    if (istg) {
                        data.field.status = "001";
                        var supProjectId = $("#supProjectId").val();
                        data.field.supProjectId = supProjectId;
                        layerAjax('/supplier/projectManager/saveAcceptProject', data.field, '', function (d) {
                            if (d.flag == true) {
                                $('#btnsave').addClass("layui-btn-disabled").attr("disabled",true);
                                layer.msg(d.msg, {icon: 1});
                                setTimeout(function(){
                                    var index = parent.layer.getFrameIndex(window.name);
                                    parent.layer.close(index);
                                },1000);
                            } else {
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled",false);
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    }else{
                        $('#btnsave').removeClass("layui-btn-disabled").attr("disabled",false);
                    }
                    return false;
                }

            },
            events: {
                _init: function () {
                    _crt_page.events.gzjinnit();
                    _crt_page.events.uploadInit();

                    var  projectType="${project.projectType}";
                    var a=[];
                    if(projectType.indexOf("001")>-1){
                        a.push("jlManagerPerson")
                    };
                    if(projectType.indexOf("002")>-1){
                        a.push("zxManagerPerson")
                    };
                    if(projectType.indexOf("003")>-1){
                        a.push("jcManagerPerson")
                    };
                    if(projectType.indexOf("100")>-1){
                        a.push("qtManagerPerson")
                    };
                    _crt_page.events._intSlt(a);

                },
                _intSlt: function (a) {
                    if(a.indexOf("jlManagerPerson")>-1){
                        layerAjaxGet("/supplier/getXmjl?xmjl=jlManagerPerson",{},"",function (d){
                            var rows=null;
                            if(d.flag){
                                if(d.data){
                                    rows=d.data;
                                }
                                if(rows){
                                    var _ycols = ['id', 'realName'];
                                    var _gpakgs=[];
                                    $.each(rows,function (i,v){
                                        _gpakgs.push({name:v[_ycols[1]],value:v[_ycols[0]]});
                                    })
                                    _xstjlManagerPerson = xmSelect.render({
                                        el: '#jlManagerPerson',
                                        name:"jlManagerPerson",
                                        radio: true,
                                        filterable: true,
                                        //layVerify: 'required',
                                        toolbar: {show: true},
                                        layVerType: 'msg',
                                        data: _gpakgs,
                                        strict: true
                                    });
                                }
                            }

                        });
                    }
                    if(a.indexOf("zxManagerPerson")>-1){
                        layerAjaxGet("/supplier/getXmjl?xmjl=zxManagerPerson",{},"",function (d){
                            var rows=null;
                            if(d.flag){
                                if(d.data){
                                    rows=d.data;
                                }
                                if(rows){
                                    var _ycols = ['id', 'realName'];
                                    var _gpakgs=[];
                                    $.each(rows,function (i,v){
                                        _gpakgs.push({name:v[_ycols[1]],value:v[_ycols[0]]});
                                    })
                                    _xstzxManagerPerson = xmSelect.render({
                                        el: '#zxManagerPerson',
                                        name:"zxManagerPerson",
                                        radio: true,
                                        filterable: true,
                                        //layVerify: 'required',
                                        toolbar: {show: true},
                                        layVerType: 'msg',
                                        data: _gpakgs,
                                        strict: true
                                    });
                                }
                            }

                        });
                    }
                    if(a.indexOf("jcManagerPerson")>-1){
                        layerAjaxGet("/supplier/getXmjl?xmjl=jcManagerPerson",{},"",function (d){
                            var rows=null;
                            if(d.flag){
                                if(d.data){
                                    rows=d.data;
                                }
                                if(rows){
                                    var _ycols = ['id', 'realName'];
                                    var _gpakgs=[];
                                    $.each(rows,function (i,v){
                                        _gpakgs.push({name:v[_ycols[1]],value:v[_ycols[0]]});
                                    })
                                     _xstjcManagerPerson = xmSelect.render({
                                        el: '#jcManagerPerson',
                                        name:"jcManagerPerson",
                                        radio: true,
                                        filterable: true,
                                        //layVerify: 'required',
                                        toolbar: {show: true},
                                        layVerType: 'msg',
                                        data: _gpakgs,
                                        strict: true
                                    });
                                }
                            }

                        });
                    }
                    if(a.indexOf("qtManagerPerson")>-1){
                        layerAjaxGet("/supplier/getXmjl?xmjl=qtManagerPerson",{},"",function (d){
                            var rows=null;
                            if(d.flag){
                                if(d.data){
                                    rows=d.data;
                                }
                                if(rows){
                                    var _ycols = ['id', 'realName'];
                                    var _gpakgs=[];
                                    $.each(rows,function (i,v){
                                        _gpakgs.push({name:v[_ycols[1]],value:v[_ycols[0]]});
                                    })
                                    _xstqtManagerPerson = xmSelect.render({
                                        el: '#qtManagerPerson',
                                        name:"qtManagerPerson",
                                        radio: true,
                                        filterable: true,
                                        toolbar: {show: true},
                                        layVerType: 'msg',
                                        data: _gpakgs,
                                        strict: true
                                    });
                                }
                            }

                        });
                    }


                },
                gzjinnit:function(){
                    var  source="${source}";
                    var  projectType="${project.projectType}";
                    var  bzjper="${bzjper}";

                    var  jlFwMoney="${project.jlFwMoney}";
                    var  zxFwMoney="${project.zxFwMoney}";
                    var  jcSsMoney="${project.jcSsMoney}";
                    var  qtFwMoney="${project.qtFwMoney}";
                    var bzj=0;
                    if(source=="w"){
                        if(projectType.indexOf("001")>-1){
                            bzj=parseFloat(bzj)+parseFloat(jlFwMoney)
                        };
                        if(projectType.indexOf("002")>-1){
                            bzj=parseFloat(bzj)+parseFloat(zxFwMoney)
                        };
                        if(projectType.indexOf("003")>-1){
                            bzj=parseFloat(bzj)+parseFloat(jcSsMoney)
                        };
                        if(projectType.indexOf("100")>-1){
                            bzj=parseFloat(bzj)+parseFloat(qtFwMoney)
                        };
                        var bgjmoney=(bzj*parseFloat(bzjper)).toFixed(6);
                        // $("#bzMoneyJs").html(cutZero(bgjmoney+""));
                        // $("#bzMoney").val(cutZero(bgjmoney+""));
                    }



                },
                uploadInit:function(){
                    var fileDataStr = $(".file-upload").attr('filedata');
                    //至少fileData中需要有文件的类型编码
                    var fileData = eval('(' + fileDataStr + ')');
                    var fileContainer = $(".uploadfilediv");
                    $(".uploadfilediv").css({"display":"block"});
                    $(".uploadfilediv").css({"border":"1px solid  #DDDDDD"});
                    //上传组件参数自定义:
                    var uploadPara = {
                        elem: $(".file-upload"),
                        accept: 'file',
                        temp:"1",
                        before: function(res){
                            this.data = fileData;
                            console.log("书著页面,上传文件之前,,,");
                            console.log(res);
                        },
                        done: function (res) {
                            if (res.flag) {
                                var newFileId = res.data.id;
                                var type = res.data.type + '';
                                var newIndex = $('.form-file-div').length * 1;
                                layer.msg("上传成功", {icon: 1});
                                $(fileContainer).append('<div  style="width: auto;" class="clearfix form-file-div form-file-div-'+type+'">\n' +
                                    '                            <span class="fl file-name-span">'+res.data.fileName+'</span>\n' +
                                    '                            <img src="/plugin/common/images/89@2x.png" class="fr cursor" onclick="_form_file.del.delTemp(this,'+'&apos;'+newFileId+'&apos;'+','+'&apos;'+type+'&apos;'+')">\n' +
                                    '                            <input type="hidden" class="' + type + '-input" name="tempFormFileIds[' + newIndex + ']" value="' + newFileId + '" />' +
                                    '                        </div>')
                            } else {
                                if (res.msg) {
                                    layer.msg(res.msg, {icon: 2})
                                } else {
                                    layer.msg("上传失败", {icon: 2})
                                }
                            }
                        },
                        container: fileContainer
                    };
                    console.log(_form_file);
                    console.log(_form_file.upload);
                    _form_file.upload.bind(uploadPara);
                },
                srxmjl:function(object){
                    var  that=$(object);
                   var hide=that.parent().find(".slt").hasClass("hide");
                    var  sltvalue=[];
                   if(!hide){
                       var  id=that.parent().find(".slt").attr("id");
                       if(id.indexOf("jl")>-1){
                           var  ss=[];
                           _xstjlManagerPerson.setValue(sltvalue);
                       }
                       if(id.indexOf("zx")>-1){
                           _xstzxManagerPerson.setValue(sltvalue);
                       }
                       if(id.indexOf("jc")>-1){
                           _xstjcManagerPerson.setValue(sltvalue);
                       }
                       if(id.indexOf("qt")>-1){
                           _xstqtManagerPerson.setValue(sltvalue);
                       }
                       that.parent().find(".slt").addClass("hide");
                       that.parent().find(".srxmjl").removeClass("hide")
                       that.parent().find(".srxmjl").attr("lay-verify","required")
                       that.parent().find(".srxmjl").val("");
                   }else {
                       that.parent().find(".slt").removeClass("hide");
                       var  id=that.parent().find(".slt").attr("id");
                       if(id.indexOf("jl")>-1){

                           _xstjlManagerPerson.setValue(sltvalue);
                       }
                       if(id.indexOf("zx")>-1){
                           _xstzxManagerPerson.setValue(sltvalue);
                       }
                       if(id.indexOf("jc")>-1){
                           _xstjcManagerPerson.setValue(sltvalue);
                       }
                       if(id.indexOf("qt")>-1){
                           _xstqtManagerPerson.setValue(sltvalue);
                       }
                       that.parent().find(".srxmjl").attr("lay-verify","")
                       that.parent().find(".srxmjl").addClass("hide");
                       that.parent().find(".srxmjl").val("");
                   }


                },
                saveBefore: function (data) {
                    var isTg = true;
                    var  publishType="${project.publishType}";
                    var  projectType="${project.projectType}";
                    var  source="${source}";
                    if(publishType!="001"){
                        //不是正中发布的项目  需要上传 文件
                      var length=  $(".form-file-div-301").find("input").length;
                      if(length==0){
                          layer.msg("请上传投标文件", {icon: 2});
                          isTg = false;
                          return isTg;
                      }
                    }
                    if(projectType.indexOf("001")>-1){
                        if(source=="w"){
                            if(!data.field.jlManagerPersonName){
                                var value= _xstjlManagerPerson.getValue('valueStr');
                                if(!value){
                                    layer.msg("请选择监理项目经理", {icon: 2});
                                    isTg = false;
                                    return isTg;
                                }

                            }

                        }else{
                            var value= _xstjlManagerPerson.getValue('valueStr');
                            if(!value){
                                layer.msg("请选择监理项目经理", {icon: 2});
                                isTg = false;
                                return isTg;
                            }
                        }

                    };
                    if(projectType.indexOf("002")>-1){
                        if(source=="w"){
                            if(!data.field.zxManagerPersonName){
                                var value= _xstzxManagerPerson.getValue('valueStr');
                                if(!value){
                                    layer.msg("请选择咨询项目经理", {icon: 2});
                                    isTg = false;
                                    return isTg;
                                }

                            }

                        }else{
                            var value= _xstzxManagerPerson.getValue('valueStr');
                            if(!value){
                                layer.msg("请选择咨询项目经理", {icon: 2});
                                isTg = false;
                                return isTg;
                            }
                        }

                    };
                    if(projectType.indexOf("003")>-1){
                        if(source=="w"){
                            if(!data.field.jcManagerPersonName){
                                var value= _xstjcManagerPerson.getValue('valueStr');
                                if(!value){
                                    layer.msg("请选择检测项目经理", {icon: 2});
                                    isTg = false;
                                    return isTg;
                                }
                            }
                        }else{
                            var value= _xstjcManagerPerson.getValue('valueStr');
                            if(!value){
                                layer.msg("请选择检测项目经理", {icon: 2});
                                isTg = false;
                                return isTg;
                            }
                       }

                    };
                    if(projectType.indexOf("100")>-1){
                        if(source=="w"){
                            if(!data.field.qtManagerPersonName){
                                var value= _xstqtManagerPerson.getValue('valueStr');
                                if(!value){
                                    layer.msg("请选择其他项目经理", {icon: 2});
                                    isTg = false;
                                    return isTg;
                                }
                            }
                        }else{
                            var value= _xstqtManagerPerson.getValue('valueStr');
                            if(!value){
                                layer.msg("请选择其他项目经理", {icon: 2});
                                isTg = false;
                                return isTg;
                            }
                        }

                    };
                    if(_xstjlManagerPerson && _xstjlManagerPerson.getValue('valueStr')){
                        data.field.jlManagerPerson=_xstjlManagerPerson.getValue('valueStr');
                    }
                    if(_xstzxManagerPerson && _xstzxManagerPerson.getValue('valueStr')){

                        data.field.zxManagerPerson=_xstzxManagerPerson.getValue('valueStr');
                    }
                    if(_xstjcManagerPerson && _xstjcManagerPerson.getValue('valueStr')){
                        data.field.jcManagerPerson=_xstjcManagerPerson.getValue('valueStr');

                    }
                    if(_xstqtManagerPerson && _xstqtManagerPerson.getValue('valueStr')){
                        data.field.qtManagerPerson=_xstqtManagerPerson.getValue('valueStr');
                    }
                    return isTg;

                },

            }
        };
        _crt_page.init();
    });

    function explain(){
        var w, h;
        if (w == null || w == '') {
            w = ($(window).width() * 0.92);
        }
        ;
        if (h == null || h == '') {
            h = ($(window).height() - 80);
        }
        layer.open({
            type: 2,
            title: '保证金说明',
            shadeClose: true,
            shade: 0.8,
            maxmin: false,
            area: [w + 'px', h + 'px'],
            content: '/supplier/ruleCentre/publishGuide?badtCode=001&badtTypecode=BZJSM001' //iframe的url
        });
    }
</script>

</body>

</html>